#pragma once
#include<iostream>
#include"util.hpp"

using namespace ns_util;
namespace ns_log
{
    enum{
        Info,
        Debug,
        Error,
        Warning,
        Fatal
    };

    std::ostream& Log(const std::string& level,const std::string& file_name,const int& line)
    {
        std::string out;
        out +=  "[";
        out += level;
        out += "]";

        out +=  "[";
        out += file_name;
        out += "]";

        out +=  "[";
        out += std::to_string(line);
        out += "]";

        out +=  "[";
        out += std::to_string(TimeUtil::GetTimeStamp());
        out += "]";

        std::cout<<out;
        return std::cout;
    }

    #define LOG(level) Log(#level,__FILE__,__LINE__)
}